home *** CD-ROM | disk | FTP | other *** search
- Path: news.oacis.com!usenet
- From: Rehan Chawdry <rchawdry@oacis.com>
- Newsgroups: comp.lang.c,comp.lang.c++,comp.lang.basic.visual.misc
- Subject: Re: DLL, VB and Borland C/C++
- Date: Wed, 27 Mar 1996 22:11:46 -0800
- Organization: Oacis Healthcare Systems
- Message-ID: <315A2DA2.716E@oacis.com>
- References: <312A0334.AC5@supaero.fr> <4gfg6m$eet@hasle.sn.no> <4hagmf$qc0@donald.interpac.be> <4j5mqr$su7@ohnasn01.sinet.slb.com> <4jc1d6$2tv@news.inc.net>
- NNTP-Posting-Host: 147.15.2.189
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0GoldB1 (Win95; I)
-
- Will Flor wrote:
- >
-
- > >>>I am trying desperatly to call a DLL created with Borland C/C++ 4.5 in a
- > >>>VB 3.0 application, but VB always complains about a so called "Bad
- > >>>Calling Convention Error". This Error message is not very documented,
- > >>>and Borland Help files are worth nothing, so...
- > >
- > >> Hi Sylvain.
- > >
- > >>Did you use, if necessary, the "byval" option in your declaration
- > >>code?
- > >
- > >>Michel
- > >
- > >I have the same problem with VB4.0 and Visual C++ DLLs
-
-
- I don't know if this is also true, but if you are compiling with C++ and attempting to
- use the functions in VB, yes, you have to export them, but also suppress the C++ name
- mangling for functions. You did this via declaring all your exported functions as
- 'extern "C" {}'. If you have Windows 3.1/VC++ 1.52 you can use the EXEHDR.EXE(?)
- program to list all of the functions in your .DLL. They should be recognizable readable
- names (unmangled). If you have Win95, you can just QuickView on the .DLL to find the
- same information. If they are funny names (MyFunction@@#@#!@#$#), then either use the
- extern keyword, or set an option in your compiler.
-
- -- Rehan --
-